import Vue from 'vue'
import App from './App.vue'
import router from './router'
import Vant from 'vant';
import { List } from 'vant'
import { Checkbox, CheckboxGroup } from 'vant'
import { Popup } from 'vant';
import { Cell, CellGroup } from 'vant';
import { PasswordInput, NumberKeyboard } from 'vant';
import { Icon } from 'vant';
import { Picker } from 'vant'
import { Circle } from 'vant';
import { NavBar } from 'vant';

import 'vant/lib/index.css';
import 'vant/lib/icon/local.css'

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
// import Bus from './utils/bus'
// import * as echarts from 'echarts'
import {PullRefresh} from 'vant'
// import 'viewerjs/dist/viewer.css'
// import Viewer from "v-viewer"
import axios from "axios"
import 'leaflet/dist/leaflet.css'

import store from './store'
import Vuex from 'vuex'
Vue.use(Vuex)

Vue.config.productionTip = false
Vue.prototype.bus = new Vue;
// Vue.prototype.$echarts = echarts

Vue.use(Vant);
Vue.use(NavBar);
Vue.use(List);
Vue.use(Checkbox);
Vue.use(Circle);
Vue.use(CheckboxGroup);
Vue.use(Popup);
Vue.use(Picker);
Vue.use(Cell);
Vue.use(CellGroup);
Vue.use(PasswordInput);
Vue.use(NumberKeyboard);
Vue.use(Icon);
Vue.use(ElementUI);
Vue.use(PullRefresh);
// Vue.use(Viewer);

// Viewer.setDefaults({
//   Options: {
//     inline: true,
//     button: false,
//     navbar: false,
//     title: true,
//     toolbar: true,
//     tooltip: true,
//     movable: true,
//     zoomable: true,
//     rotatable: true,
//     scalable: true,
//     transition: true,
//     fullscreen: true,
//     keyboard: true,
//     url: 'data-source'
//   }+
// })
//地图配置相关
Vue.prototype.$rootMap ={
  map: null,
  viewer: null,
  markerLayer: null,
  token: '',
  packagelist: []
}
Vue.prototype.$globalObj={
  points:[],
  taskDesc:null,
  geojson:null,
  openObj:XMLHttpRequest.prototype.reallOpen,
  sendObj:XMLHttpRequest.prototype.reallySend
}
Vue.prototype.$systemMes={
  loginId:sessionStorage.getItem('bdid'),
  loginName:sessionStorage.getItem('bdname'),
  receiveId:'',//接收北斗卡号
  receiveName:'',//接收北斗名称

  bdStyle:0,//0短报文1位置上报
  bdFrequecy:60,//频率
  bdFrePoint:0,//频点
  isContinuous:0,//0单次，1连续

  carrerType:'',//载体类型
  carrierWidth:0,
  carrierHeight:0,
  carrierWeight:0
}
// router.afterEach((to,from,after)=>{
//   console.log(to)
//   if(to.path==='/gaofen'){
//
//   }
// });
new Vue({
  router,
  store,
  render: h => h(App),
}).$mount('#app')
